/*
Exercises

    4. Examine this program and anticipate the output: 

1: #include <iostream.h>
2: int main()
3: {
4: int a = 1, b = 1, c;
5: if (c = (a-b))
6: cout << "The value of c is: " << c;
7: return 0;
8: }

    5. Enter, compile, link, and run the program from Exercise 4. What was the output? Why?


*/

#include <iostream.h>
int main(){
	int a = 1, b = 1, c;
	if (c = (a-b))
		cout << "The value of c is: " << c;
	return 0;
}

/*
sidney@sidney-laptop:~/learning-cplusplus/chapter04$ g++ -Wall -o test exercise05.cpp
In file included from /usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/backward/iostream.h:31,
                 from exercise05.cpp:20:
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../include/c++/4.1.2/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header <iostream.h>. To disable this warning use -Wno-deprecated.
exercise05.cpp: In function ‘int main()’:
exercise05.cpp:23: warning: suggest parentheses around assignment used as truth value
sidney@sidney-laptop:~/learning-cplusplus/chapter04$ ./testsidney@sidney-laptop:~/learning-cplusplus/chapter04$ 
*/
